﻿using Shop.Model.DB;
using Shop.Model.GoodsSku;
using Shop.RemoteModel.GoodsSku.Model;
using WeDonekRpc.Model;

namespace Shop.Collect
{
    public interface IGoodsSkuCollect
    {
        SkuDatum[] Query (SkuQueryParam query, IBasicPage paging, out int count);
        long[] Clear (long goodsId, string[] specKey);
        DBGoodsSku[] GetsByGoodsId (long goodsId);
        Result[] GetsByGoodsId<Result> (long goodsId) where Result : class, new();
        Result[] GetsByGoodsId<Result> (long[] goodsId) where Result : class, new();
        long[] GetSkuId (long goodsId);
        int GetSkuNum (long goodsId);
        DBGoodsSku Find (long goodsId, string specKey);

        long Add (SkuAdd add);

        bool Set (DBGoodsSku sku, SkuSet set);

        DBGoodsSku Get (long id);
        DBGoodsSku Find (long skuId);
        long? Delete (long goodsId, string specKey);
        Dictionary<string, long> GetsBySpecKey (long goodsId);
        long GetGoodsId (long skuId);
        Result[] Gets<Result> (long[] ids) where Result : class;
        SkuDatum[] GetSkuDatums (long[] skuId);
        Dictionary<long, string> GetSkuName (long[] ids);

        string GetSkuName (long id);

        decimal GetMinPrice ( long[] skuId );
    }
}